tuples = [(1, 'banana'), (3, 'pie'), (2, 'Washington'), (4, 'book')]  
# 使用lambda表达式，根据元组的第一个元素排序  
sorted_tuples = sorted(tuples, key=lambda x: x[0],reverse=True)  
print(sorted_tuples)
sorted_tuples = sorted(tuples, key=lambda x: x[1])  
print(sorted_tuples)  # 输出: [(1, 'banana'), (2, 'Washington'), (3, 'pie'), (4, 'book')]